import request from '@/utils/request'

// 创建风险点类型
export function createRiskPointType(data) {
  return request({
    url: '/biz/riskPointType/create',
    method: 'post',
    data: data
  })
}

// 更新风险点类型
export function updateRiskPointType(data) {
  return request({
    url: '/biz/riskPointType/update',
    method: 'put',
    data: data
  })
}

// 删除风险点类型
export function deleteRiskPointType(id) {
  return request({
    url: '/biz/riskPointType/delete?id=' + id,
    method: 'delete'
  })
}

// 获得风险点类型
export function getRiskPointType(id) {
  return request({
    url: '/biz/riskPointType/get?id=' + id,
    method: 'get'
  })
}

// 获得风险点类型分页
export function getRiskPointTypePage(query) {
  return request({
    url: '/biz/riskPointType/page',
    method: 'get',
    params: query
  })
}

// 导出风险点类型 Excel
export function exportRiskPointTypeExcel(query) {
  return request({
    url: '/biz/riskPointType/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 获得风险点类型分页
export function getAllPointType() {
  return request({
    url: '/biz/riskPointType/getAllPointType',
    method: 'get'
  })
}
